$(document).ready(function(){
	//编辑物资
	$('#edit_Good').click(function(){
		var gID = $("#gID").text();
		window.location.href="/ag/hmk/findSomeGoods_findOneGood.action?gID=+"+gID+"&findType1=1";
	});
	
	//删除物资
	$('#del_G').click(function(){
		var isPass = confirm("确定要删除吗？");
		if(isPass){
			var gID = $("#gID").text();
			var url = 'hmk/delGoods_delGood.action';
			var params = {
				gID:gID
			}; 
			jQuery.post(url, params, delData, 'json');
		}
	});
	
	//返回
	$('#back_g').click(function(){
		window.location.replace("/ag/hmk/wuzhiMain.jsp");	
	});

});


function delData(data){
	if(data.delStr=='1'){
		alert("删除成功");
		window.location.replace("/ag/hmk/wuzhiMain.jsp");
	 }else{
		alert("删除失败");
	 }
}